﻿@model StoryTimeline.Models.Story

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<div>
    <h4>Story</h4>
	<hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Name)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Name)
        </dd>

    </dl>
    
    <table class="table">
        <tr>
            <th>
                Date
            </th>
            <th>
                Text
            </th>
            <th>
                Rate
            </th>
        </tr>

        @foreach (var item in Model.Facts)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Date)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Text)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Rate)
                </td>
            </tr>
        }
    </table>
</div>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
